<?php

class Developer_IndexController extends My_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
        $auth = Zend_Auth::getInstance();
        if ($auth->hasIdentity())
        {
            $username = $auth->getIdentity()->usuario;
            $this->view->userName = $username;
        }
    }

    public function mapAction()
    {
        $tableName = $this->getRequest()->getParam('table', null);
        $tableName = 'usuario';
        if (!is_null($tableName))
        {
            $code = My_DataBase_Mapper_Table::factory()
            ->setTableName($tableName)
            ->setPrefixForClassName('Application_Model')
            ->setOutputDir(APPLICATION_PATH.'/models')
            ->doMap();
            $this->view->mapperClass = $code['mapperClass'];
            $this->view->finderClass = $code['finderClass'];
        }
        
    }

}

